﻿using Microsoft.Xna.Framework;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace TestClient_console.Core
{
    public class RemoteBody
    {
        public int ID = 0;
        public Vector2 position = Vector2.Zero;
        public class CollisionEventArgs : EventArgs 
        {
            public RemoteBody b1;
            public RemoteBody b2;
        }

        public delegate void CollisionEventHandler (object sender, CollisionEventArgs e);
        public event CollisionEventHandler OnCollision;

        public RemoteBody(int id, Vector2 pos)
        {
            ID = id;
            position = pos;
        }

        public void Collision(RemoteBody collider)
        {
            OnCollision(this, new CollisionEventArgs() { b1 = this, b2 = collider });
        }
    }
}
